<%@include file="/include/head.jspf" %>
<%@page import="java.util.*, com.atech.ace.entity.*" %>
<jsp:useBean id="cart" scope="session" class="com.atech.ace.web.cart.ShoppingCart" />	
	<div align="center">
	Review your cart:
	<form method="POST" action="/ACEShopWeb/checkout">
<table bgcolor="white" border="1" width="95%" cellpadding="5" cellspacing="5">
<tr><td>Product</td><td>Quantity</td><td>Subtotal</td></tr>
 
 <%
   	 Iterator i = cart.getProducts().entrySet().iterator();
      while(i.hasNext())
      {
        Map.Entry me = ( Map.Entry) i.next();
        Product product = ( Product ) me.getValue();
        Double subtotal = product.getPrice() * product.getCurrentQuantity();
  %>
  <tr>
  <td><%=product.getName()%></td>
  <td><%=product.getCurrentQuantity()%></td>
  <td><%=subtotal %></td>
  </tr>
  <%
     
   	  }
   	 
   %>
   <tr><td colspan="3"><input type="submit" value="checkout" /></td></tr>
</table>	
</form>
</div>
<%@include file="/include/footer.jspf" %>